﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcForum.Net.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%
        var _page = ViewData["Page"] as PageEntity;%>
    <%=Html.Title("{0} - {1}", _page.Name, ForumContext.Configuration.ForumName)%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%Html.RenderPartial("LogOn"); Html.RenderPartial("navigation");

      var _users = ViewData["Users"] as List<UserEntity>;
    %>
    <div class="fr-widget white-space">
        <div class="header">
            <div class="icon">
            </div>
            <span>
                <%=ForumContext.GetText("MEMBERS","PAGE_NAME") %></span>
        </div>
        <table cellpadding="0" cellspacing="1" width="100%">
            <tr>
                <td class="table-header width30">
                    <%=ForumContext.GetText("UserInfo","UserName") %>
                </td>
                <td class="table-header width10">
                    <%=ForumContext.GetText("UserInfo","TotalPosts") %>
                </td>
                <td class="table-header width15">
                    <%=ForumContext.GetText("UserInfo","RegDate") %>
                </td>
                <td class="table-header width15">
                    <%=ForumContext.GetText("UserInfo","LastLogin") %>
                </td>
                <td class="table-header width10">
                    <%=ForumContext.GetText("UserInfo","TotalVisits") %>
                </td>
            </tr>
            <% 
            
                foreach (var _user in _users)
                {


            %>
            <tr>
                <td class="table-cell">
                    <a href="<%=ForumContext.GetAbsoluteUrl(ForumUrls.USER_INFO,_user.UserName)%>" title="<%=Html.Encode(_user.UserName) %>">
                        <% =Html.Encode(_user.UserName) %></a>
                </td>
                <td class="table-cell center">
                    <%=_user.TotalPosts%>
                </td>
                <td class="table-cell center">
                    <%=ForumContext.PrettyDate(_user.RegDate)%>
                </td>
                <td class="table-cell center">
                    <%=ForumContext.PrettyDate(_user.LastLogin)%>
                </td>
                <td class="table-cell center">
                    <%=_user.TotalVisits%>
                </td>
            </tr>
            <%
                }%>
        </table>
    </div>
    <div class="white-space">
        <%
            var _totalRows = Convert.ToInt32(ViewData["TotalRows"]);
            var _pageIndex = Convert.ToInt32(ViewData["PageIndex"]);
        
        %>
        <%=ForumContext.PageRender(ForumContext.GetAbsoluteUrl(ForumUrls.MEMBERS)+"?P={0}",_pageIndex,ForumContext.Configuration.PageSize,_totalRows) %>
    </div>
    <br class="clear-all" />
    <br class="clearfix" />
    
</asp:Content>
